Explaining Algebraic Theory with Functional Programs
نویسنده
چکیده
A hierarchy of six important structures from abstract algebra (groups, rings, fields etc.) is introduced as Gofer class definitions and laws about them. Many instance declarations are provided, explaining the algebraic construction of integers, quotients, adding i, function spaces, polynomials, and matrices. The definitions include generalized implementations of polynomial division and matrix inversion. Monadic parsers are provided for all constructs discussed. As an application, a one-line program is given for calculating the eigenvalue equation of a matrix.
منابع مشابه
Explaining the main factors shaping and establishing leadership of managers: grounded theory method
Introduction: Among human resources, the role of leadership is more privileged and more prominent than others, so it can be said that the success of an organization depends to a large extent on the efficiency of management and leadership. The present study aims to explain the main factors shaping and establishing the creative leadership of managers. Method: This study was carried out within the...
متن کاملCompleteness for Algebraic Theories of Local State
Every algebraic theory gives rise to a monad, and monads allow a meta-language which is a basic programming language with sideeffects. Equations in the algebraic theory give rise to equations between programs in the meta-language. An interesting question is this: to what extent can we put equational reasoning for programs into the algebraic theory for the monad? In this paper I focus on local s...
متن کاملAutomata-Based Abstraction for Automated Verification of Higher-Order Tree-Processing Programs
Higher-order model checking has been recently applied to automated verification of higher-order functional programs, but there have been difficulties in dealing with algebraic data types such as lists and trees. To remedy the problem, we propose an automata-based abstraction of tree data, and a counterexample-guided refinement of the abstraction. By combining them with higher-order model checki...
متن کاملImperative abstractions for functional actions
We elaborate our relational model of non-strict, imperative computations. The theory is extended to support infinite data structures. To facilitate their use in programs, we extend the programming language by concepts such as procedures, parameters, partial application, algebraic data types, pattern matching and list comprehensions. For each concept, we provide a relational semantics. Abstracti...
متن کاملStatic Dependency Pair Method in Rewriting Systems for Functional Programs with Product, Algebraic Data, and ML-Polymorphic Types
For simply-typed term rewriting systems (STRSs) and higher-order rewrite systems (HRSs) à la Nipkow, we proposed a method for proving termination, namely the static dependency pair method. The method combines the dependency pair method introduced for first-order rewrite systems with the notion of strong computability introduced for typed λ-calculi. This method analyzes a static recursive struct...
متن کامل